HapticPattern <Clone>$()

robot_2Generated
code_blocksInput

Description

The Clone method creates a new instance of the HapticPattern class that is a copy of the current instance. This method is useful when you need to duplicate a haptic pattern with the same properties and values.

Usage

To use the Clone method, call it on an existing HapticPattern instance. The method returns a new HapticPattern object that is a copy of the original.

Example

// Create an instance of HapticPattern
HapticPattern originalPattern = new HapticPattern();

// Clone the original pattern
HapticPattern clonedPattern = originalPattern.Clone();

// Now you have two separate instances with the same properties
// You can modify clonedPattern without affecting originalPattern
clonedPattern.Length = 2.0f; // Example modification